<?php
@define('IN_CAI', TRUE);
ini_set('session.gc_maxlifetime','43200');
$_SGLOBAL = $_SCONFIG = $_SBLOCK = $_TPL = $_SCOOKIE = $_SN = $space = array();
//程序目录
define('S_ROOT', dirname(__FILE__).DIRECTORY_SEPARATOR);
define('D_BUG',false);
define('UC_KEY','123');

//基本文件
if(!@include_once(S_ROOT.'./config.php')) {
	exit();
}

//通用函数
include_once(S_ROOT.'./function_common.php');

//GPC过滤
$magic_quote = get_magic_quotes_gpc();
if(empty($magic_quote)) {
	$_GET = saddslashes($_GET);
	$_POST = saddslashes($_POST);
}
//COOKIE
$prelength = strlen($_SC['cookiepre']);
foreach($_COOKIE as $key => $val) {
	if(substr($key, 0, $prelength) == $_SC['cookiepre']) {
		$_SCOOKIE[(substr($key, $prelength))] = empty($magic_quote) ? saddslashes($val) : $val;
	}
}

//链接数据库
dbconnect();
$db = $_SGLOBAL['db'];
$_SGLOBAL['refer'] = empty($_SERVER['HTTP_REFERER'])?'':$_SERVER['HTTP_REFERER'];
?>